<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	
</script>
</head>
<body>
<table border="1" width="600">
	<tr>
		<td colspan="8" align="right"><a href="#">添加用户</a></td>
	</tr>
	<tr>
		<td>编号</td>
		<td>姓名</td>
		<td>性别</td>
		<td>邮箱</td>
		<td>电话</td>
		<td>地址</td>
		<td>年龄</td>
		<td>操作</td>
	</tr>
	<c:forEach items="${pageBean.list}" var="student">
		<tr>
			<td>${student.sid}</td>
			<td>${student.sname}</td>
			<td>${student.sex}</td>
			<td>${student.email}</td>
			<td>${student.telephone}</td>
			<td>${student.addr}</td>
			<td>${student.age}</td>
			<td><a href="editCustomer.jsp">编辑</a>|<a href=""#>删除</a></td>
		</tr>
	</c:forEach>
	<tr>
		<td colspan="8">
			<%--1.判断是否显示上一页--%>
			<c:if test="${pageBean.currentPage!=1}">
				<a href="${pageContext.request.contextPath}/student/FindPageStudentController?currentPage=${pageBean.lastPage}">
					上一页
				</a>
			</c:if>
			<%--2.显示导航的页码数字--%>
			<c:forEach begin="${pageBean.firstPage}" end="${pageBean.endPage}" var="page">
				<a href="${pageContext.request.contextPath}/student/FindPageStudentController?currentPage=${page}">
					${page}  &nbsp;
				</a>
			</c:forEach>
			<%--3.判断是否显示下一页--%>
			<c:if test="${pageBean.currentPage!=pageBean.totalPage}">
			<a href="${pageContext.request.contextPath}/student/FindPageStudentController?currentPage=${pageBean.nextPage}">
						下一页
			</a>
			</c:if>
		</td>
	</tr>
</table>
</body>
</html>